<?php

class m130808_145003_create_table_repayments extends CDbMigration
{
	public function up()
	{
		$this->createTable('{{repayments}}',array(
			'id' => 'pk',
			'credit_id' => 'INT(11) NOT NULL',
			'user_id' => 'INT(11) NOT NULL',
			'sum' => 'FLOAT NOT NULL',
			'created_at' => 'DATETIME NOT NULL'
		));
	}

	public function down()
	{
		$this->dropTable('{{repayments}}');
	}
}